async function sum(a: number, b: number) {
    console.log('F')
}

Promise.resolve().then(() => {
    console.log('C')
})

new Promise((resolve) => {
    console.log('D')
    return resolve('')
}).then(() => {
    console.log('E')
    // return Promise.resolve()
    return 0
}).then(() => {
    console.log('I');
}).then(() => {
    console.log('J');
}).then(() => {
    console.log('K');
})

setTimeout(() => {
    console.log('A')
    Promise.resolve().then(() => {
        console.log('B')
    })
}, 1000)

async function asyncSum(a: number, b: number) {
    await Promise.resolve()
    console.log('G')
    return Promise.resolve(a + b)
}

sum(3, 4)
asyncSum(3, 4).then(res => {
    console.log(res);
})
console.log('H')

// result   :       D F H C E G I J K A B
// result   :       D F H C E G I J K 7 A B
